'''
用户管理模块封装
'''
from car_rental.caw.base_request import BaseRequest


def register(url,test_request,cs):
    """

    :rtype: object
    :param url:测试环境
    :param test_request:BaseRequest的实例
    :param cs: 请求参数
    :return: 注册接口的响应
    """
    url=url+'/futureloan/mvc/api/member/register'
    r=test_request.post(url,data=cs)
    return r

def login(url,test_request,cs):
    """

    :param url:测试环境
    :param test_request:BaseRequest的实例
    :param cs: 请求参数
    :return: 注册接口的响应
    """
    url=url+'/futureloan/mvc/api/member/login'
    r=test_request.post(url,data=cs)
    return r

def recharge(url,test_request,cs):
    """

    :param url:测试环境
    :param test_request:BaseRequest的实例
    :param cs: 请求参数
    :return: 注册接口的响应
    """
    url=url+'/futureloan/mvc/api/member/recharge'
    r=test_request.post(url,data=cs)
    return r


if __name__ == '__main__':
    register('http://192.168.151.6:8080',BaseRequest(),{"mobilephone":'',"pwd":'123456'})